cmake_minimum_required(VERSION 3.0.2)
project(zhz_img_convert)

set(CMAKE_CXX_STANDARD 14)
add_compile_options("-O3" "-funsafe-loop-optimizations" "-fsee" "-funroll-loops" "-fno-math-errno" "-funsafe-math-optimizations" "-ffinite-math-only" "-fno-signed-zeros")

find_package(Eigen3 REQUIRED)
find_package(OpenCV REQUIRED)

find_package(catkin REQUIRED COMPONENTS
  cmake_modules
  cv_bridge
  geometry_msgs
  image_geometry
  image_transport
  message_generation
  roscpp
  sensor_msgs
  std_msgs
)

catkin_package(
  CATKIN_DEPENDS
  roscpp
)

# list(REMOVE_ITEM catkin_LIBRARIES ${OPENCV420})
###########
## Build ##
###########

include_directories(
  "src/*.h"
  ${catkin_INCLUDE_DIRS}
  ${EIGEN3_INCLUDE_DIRS}
  ${OpenCV_INCLUDE_DIRS}
)

file(GLOB SRCS
  "src/*.cc"
  "src/*.cpp"
)

add_executable(zhz_img_convert ${SRCS})
target_link_libraries(zhz_img_convert ${catkin_LIBRARIES})


